{template modoer_header}
<script type="text/javascript" src="{URLROOT}/static/javascript/item.js"></script>
<div id="body">
<div class="myhead"></div>
<div class="mymiddle">
    <div class="myleft">
        <!--{eval !$mymenu && $mymenu = 'mmenu';}-->
        <!--{template $mymenu,'member','member'}-->
    </div>
    <div class="myright">
        <div class="myright_top"></div>
        <div class="myright_middle">
            <h3>{if $mymenu}<cite>当前操作的主题:<span class="font_2">$_G[manage_subject][name]{if $_G[manage_subject][subname]}($_G[manage_subject][subname]){/if}</span>[<a href="javascript:void(0);" onclick="item_subject_manage();">更换</a>]</cite>{/if}$subtitle</h3>
            <div class="mainrail">
                <!--{if $grade_cls->coupon_disabled}-->
                <div class="messageborder">对不起，您的主题等级没有权限使用优惠券功能。</div>
                <!--{else}-->
                <ul class="optabs"><!--{loop $status_array $k $v}--><li{if $status==$k} class="active"{/if}><a href="{url coupon/member/ac/$ac/status/$k}">$v({print (int)$status_group[$k]})</a></li><!--{/loop}--><!--{if $access_add}--><li class="act"><a href="{url coupon/member/ac/coupon/op/add/role/$role}">发布优惠券</a></li><!--{/if}--></ul><div class="clear"></div>
                <form method="post" name="myform" action="{url coupon/member/ac/coupon/rand/$_G[random]}">
                <table width="100%" cellspacing="0" cellpadding="0" class="maintable" trmouse="Y">
                    <tr class="thbg">
                        {if $access_del}<th width="25">删?</th>{/if}
                        <th width="120">名称</th>
                        <th width="150">主题</th>
                        <th width="*">优惠说明</th>
                        <th width="60">状态</th>
                        <th width="60">操作</th>
                    </tr>
                    <!--{dbres $list $val}-->
                    <tr>
                        {if $access_del}<td><input type="checkbox" name="couponids[]" value="$val[couponid]" /></td>{/if}
                        <td><a href="{url coupon/detail/id/$val[couponid]}" target="_blank">$val[subject]</a></td>
                        <td><a href="{url item/detail/id/$val[sid]}">$val[name].$val[subname]</a></td>
                        <td>$val[des]</td>
                        <td>{print $status_array[$val[status]]}</td>
                        <td><a href="{url coupon/member/ac/coupon/op/edit/couponid/$val[couponid]/role/$role}">编辑</a></td>
                    </tr>
                    <!--{/dbres}-->
                    <!--{if !$total}-->
                    <tr>
                        <td colspan="6">暂无信息。</td>
                    </tr>
                    <!--{/if}-->
                </table>
                <!--{if $total}-->
                <div class="multipage">$multipage</div>
                <div class="text_center">
                    <input type="hidden" name="do" value="$op" />
                    <input type="hidden" name="dosubmit" value="yes" />
                    <input type="hidden" name="op" value="delete" />
                    <!--{if $access_del}-->
                    <button type="button" onclick="easy_submit('myform','delete','couponids[]');">删除所选</button>
                    <!--{/if}-->
                </div>
                <!--{/if}-->
                </form>                
                <!--{/if}-->
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>
<div class="mybottom"></div>
</div>
<!--{eval footer();}-->